Modify git.mk to handle our split NLS directories
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 3 Aug 2016 10:52:08 +0000 (11:52 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 3 Aug 2016 10:52:08 +0000 (11:52 +0100)
GTK+ has two directories for translations: the default 'po' and the
additional 'po-properties' for the GObject properties translation
domain.

Since the content of the translations directories are filled by
autoreconf and gettext, and are duplicated between the two gettext
domains we use, we should handle this ad hoc inside git.mk, instead of
trying to catch up by adding po-properties files in GITIGNOREFILES.

Makefile.am
git.mk

index 0e9eeff49f8c7dbcd31ea359db2adac49655a54e..86f773a1d4c90300b6a62eac69f01d9268c8ceb1 100644 (file)
@@ -104,13 +104,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS =             \
        --enable-introspection          \
        --enable-installed-tests
 
-GITIGNOREFILES = \
-       po-properties/Makefile.in.in \
-       po-properties/Makefile.in \
-       po-properties/Makefile \
-       po-properties/*.gmo \
-       po-properties/*.mo \
-       po-properties/POTFILES \
-       po-properties/stamp-it
+GITIGNORE_TRANSLATION_DIRS = po-properties
+GITIGNOREFILES = po-properties/gtk30-properties.pot
 
 -include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
index af15798adfca11fcf190873899d88bc2e42e956a..617519036c33dde8db789efdba52b605cb3f99e4 100644 (file)
--- a/git.mk
+++ b/git.mk
@@ -214,28 +214,34 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
                                $(appstream_XML:.xml=.valid) \
                        ; do echo "/$$x"; done; \
                fi; \
-               if test -f $(srcdir)/po/Makefile.in.in; then \
+               for tdir in po $(GITIGNORE_TRANSLATION_DIRS); do \
+                       if test -f "$(srcdir)/$$tdir/Makefile.in.in"; then \
+                               for x in \
+                                       $$tdir/Makefile.in.in \
+                                       $$tdir/Makefile.in.in~ \
+                                       $$tdir/Makefile.in \
+                                       $$tdir/Makefile \
+                                       $$tdir/Makevars.template \
+                                       $$tdir/POTFILES \
+                                       $$tdir/Rules-quot \
+                                       $$tdir/stamp-it \
+                                       $$tdir/stamp-po \
+                                       $$tdir/.intltool-merge-cache \
+                                       "$$tdir/*.gmo" \
+                                       "$$tdir/*.header" \
+                                       "$$tdir/*.mo" \
+                                       "$$tdir/*.sed" \
+                                       "$$tdir/*.sin" \
+                                       $$tdir/$(GETTEXT_PACKAGE).pot \
+                               ; do echo "/$$x"; done; \
+                       fi; \
                        for x in \
-                               po/Makefile.in.in \
-                               po/Makefile.in.in~ \
-                               po/Makefile.in \
-                               po/Makefile \
-                               po/Makevars.template \
-                               po/POTFILES \
-                               po/Rules-quot \
-                               po/stamp-it \
-                               po/.intltool-merge-cache \
-                               "po/*.gmo" \
-                               "po/*.header" \
-                               "po/*.mo" \
-                               "po/*.sed" \
-                               "po/*.sin" \
-                               po/$(GETTEXT_PACKAGE).pot \
+                               ABOUT-NLS \
                                intltool-extract.in \
                                intltool-merge.in \
                                intltool-update.in \
                        ; do echo "/$$x"; done; \
-               fi; \
+               done; \
                if test -f $(srcdir)/configure; then \
                        for x in \
                                autom4te.cache \